Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Description

The ado2gh generate-script --rewire-pipelines command fails to recognize GitHub Enterprise Cloud with data residency service connections, which use type GitHubProximaPipelines instead of GitHub. This causes pipeline rewiring to fail despite valid service connections being configured.

Changes

  • AdoApi.cs: Extended GetTeamProjectGithubAppId to accept both GitHub and GitHubProximaPipelines service connection types
  • AdoApiTests.cs: Added test coverage for GitHubProximaPipelines service connections
  • RELEASENOTES.md: Documented the change

Before:

var endpoint = response.FirstOrDefault(x => 
    ((string)x["type"]).Equals("GitHub", StringComparison.OrdinalIgnoreCase) && 
    ((string)x["name"]).Equals(githubOrg, StringComparison.OrdinalIgnoreCase));

After:

var endpoint = response.FirstOrDefault(x =>
    (((string)x["type"]).Equals("GitHub", StringComparison.OrdinalIgnoreCase) ||
     ((string)x["type"]).Equals("GitHubProximaPipelines", StringComparison.OrdinalIgnoreCase)) &&
    ((string)x["name"]).Equals(githubOrg, StringComparison.OrdinalIgnoreCase));

Checklist

  • Did you write/update appropriate tests
  • Release notes updated (if appropriate)
  • Appropriate logging output
  • Issue linked
  • Docs updated (or issue created)
  • New package licenses are added to ThirdPartyNotices.txt (if applicable)
Original prompt

This section details on the original issue you should resolve

<issue_title>ado2gh: Support for ado2gh generate-script --rewire-pipelines for GitHub Enterprise cloud with data residency app</issue_title>
<issue_description>## Description

Running this command:

gh ado2gh generate-script --github-org <org> --ado-org ericsoderqvist --ado-team-project <project> --target-api-url https://api.<subdomain>.ghe.com --rewire-pipelines

Script for migrating repositories gets created, however the pipelines don't get rewired. The tool recognises the service connection but still give me this error in the logs:

[2025-11-11 10:48:01] [WARNING] CANNOT FIND GITHUB APP SERVICE CONNECTION IN ADO ORGANIZATION: ericsoderqvist. You must install the Pipelines app in GitHub and connect it to any Team Project in this ADO Org first.

From the code I can see that the value is hardcoded to look for service connections with type GitHub

Image

The type for the GitHub Enterprise cloud with data residency app is GitHubProximaPipelines

Could this be added so migrations from Azure DevOps to GitHub with data residency becomes more friction free? </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…2gh rewire-pipelines

Co-authored-by: brianaj <2413532+brianaj@users.noreply.github.com>
Copilot AI changed the title [WIP] Support for rewire pipelines in ado2gh generate-script ado2gh: Support GitHubProximaPipelines service connections for --rewire-pipelines Nov 12, 2025
Copilot AI requested a review from brianaj November 12, 2025 18:28
Copilot finished work on behalf of brianaj November 12, 2025 18:28
@brianaj brianaj marked this pull request as ready for review November 17, 2025 20:10
Copilot AI review requested due to automatic review settings November 17, 2025 20:10
Copilot finished reviewing on behalf of brianaj November 17, 2025 20:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for GitHub Enterprise Cloud with data residency service connections in the ado2gh generate-script --rewire-pipelines command. The tool now recognizes both standard GitHub and GitHubProximaPipelines service connection types, resolving the issue where pipeline rewiring failed for GitHub Enterprise Cloud with data residency configurations.

Key changes:

  • Extended service connection type matching to include GitHubProximaPipelines in addition to GitHub
  • Added test coverage for the new service connection type
  • Updated release notes to document the enhancement

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Octoshift/Services/AdoApi.cs Modified GetTeamProjectGithubAppId to accept both GitHub and GitHubProximaPipelines service connection types using OR logic
src/OctoshiftCLI.Tests/Octoshift/Services/AdoApiTests.cs Added test case GetGithubAppId_Should_Recognize_GitHubProximaPipelines_Service_Connection to verify the new service connection type is recognized
RELEASENOTES.md Added user-friendly description of the new feature in the Unreleased section

@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Unit Test Results

  1 files    1 suites   10m 24s ⏱️
949 tests 949 ✅ 0 💤 0 ❌
950 runs  950 ✅ 0 💤 0 ❌

Results for commit 5eed024.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
ado2gh 72% 70% 712
Octoshift 83% 72% 1716
bbs2gh 83% 77% 653
gei 81% 72% 574
Summary 80% (7695 / 9558) 73% (1812 / 2493) 3655

@brianaj brianaj enabled auto-merge November 18, 2025 23:06
@brianaj brianaj requested a review from dpmex4527 November 18, 2025 23:06
@brianaj brianaj merged commit 2abb585 into main Nov 18, 2025
58 of 60 checks passed
@brianaj brianaj deleted the copilot/support-rewire-pipelines branch November 18, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ado2gh: Support for ado2gh generate-script --rewire-pipelines for GitHub Enterprise cloud with data residency app

3 participants